import type { App } from "vue"
import PrimeVue from 'primevue/config';
import Aura from "@primevue/themes/aura";
import { register } from "@va/primevue"

import AnimateOnScroll from 'primevue/animateonscroll';
import ToastService from 'primevue/toastservice';
import Tooltip from 'primevue/tooltip';
import Ripple from 'primevue/ripple';
import FloatLabel from 'primevue/floatlabel';
import InputText from "primevue/inputtext"
import InputGroup from 'primevue/inputgroup';
import InputGroupAddon from 'primevue/inputgroupaddon';

export function setupPrimeVue(app: App){
    app.use(PrimeVue, {
        theme: {
            preset: Aura,
            options: {
                prefix: 'p',
                darkModeSelector: '.dark',
                // cssLayer: false
            }
        },
        ripple: true
    });
    app.use(ToastService);
    app.directive('animateonscroll', AnimateOnScroll);
    app.directive('tooltip', Tooltip);
    app.directive('ripple', Ripple);
    register(app, {
        FloatLabel,
        InputText,
        InputGroup,
        InputGroupAddon
    })
}

